99 research outputs found

    A Framework for Verification and Debugging of Resource Usage Properties

    Get PDF
    We present a framework for (static) verification of general resource usage program properties. The framework extends the criteria of correctness as the conformance of a program to a specification expressing non-functional global properties, such as upper and lower bounds on execution time, memory, energy, or user defined resources, given as functions on input data sizes. A given specification can include both lower and upper bound resource usage functions, i.e., it can express intervals where the resource usage is supposed to be included in. We have defined an abstract semantics for resource usage properties and operations to compare the (approximated) intended semantics of a program (i.e., the specification) with approximated semantics inferred by static analysis. These operations include the comparison of arithmetic functions (e.g., polynomial, exponential or logarithmic functions). A novel aspect of our framework is that the static checking of assertions generates answers that include conditions under which a given specification can be proved or disproved. For example, these conditions can express intervals of input data sizes such that a given specification can be proved for some intervals but disproved for others. We have implemented our techniques within the Ciao/CiaoPP system in a natural way, so that the novel resource usage verification blends in with the CiaoPP framework that unifies static verification and static debugging (as well as run-time verification and unit testing)

    Analysis of concurrent constraint logic programs with a fixed scheduling rule

    Get PDF
    The analysis of concurrent constraint programs is a challenge due to the inherently concurrent behaviour of its computational model. However, most implementations of the concurrent paradigm can be viewed as a computation with a fixed scheduling rule which suspends some goals so that their execution is postponed until some condition awakens them. For a certain kind of properties, an analysis defined in these terms is correct. Furthermore, it is much more tractable, and in addition can make use of existing analysis technology for the underlying fixed computation rule. We show how this can be done when the starting point is a framework for the analysis of sequential programs. The resulting analysis, which incorporates suspensions, is adequate for concurrent models where concurrency is localized, e.g. the Andorra model. We refine the analysis for this particular case. Another model in which concurrency is preferably encapsulated, and thus suspensions are local to parts of the computation, is that of CIAO. Nonetheless, the analysis scheme can be generalized to models with global concurrency. We also sketch how this could be done, and we show how the resulting analysis framework could be used for analyzing typical properties, such as suspensión freeness

    An automatic translation scheme from CLP to AKL

    Get PDF
    The Andorra Kernel language scheme was aimed, in principle, at simultaneously supporting the programming styles of Prolog and committed choice languages. Within the constraint programming paradigm, this family of languages could also in principle support the concurrent constraint paradigm. This happens for the Agents Kernel Language (AKL). On the other hand, AKL requires a somewhat detailed specification of control by the user. This could be avoided by programming in CLP to run on AKL. However, CLP programs cannot be executed directly on AKL. This is due to a number of factors, from more or less trivial syntactic differences to more involved issues such as the treatment of cut and making the exploitation of certain types of parallelism possible. This paper provides a translation scheme which is a basis of an automatic compiler of CLP programs into AKL, which can bridge those differences. In addition to supporting CLP, our style of translation achieves independent and-parallel execution where possible, which is relevant since this type of parallel execution preserves, through the translation, the user-perceived "complexity" of the original program

    An automatic translation scheme from prolog to the andorra kernel language

    Full text link
    The Andorra family of languages (which includes the Andorra Kernel Language -AKL) is aimed, in principie, at simultaneously supporting the programming styles of Prolog and committed choice languages. On the other hand, AKL requires a somewhat detailed specification of control by the user. This could be avoided by programming in Prolog to run on AKL. However, Prolog programs cannot be executed directly on AKL. This is due to a number of factors, from more or less trivial syntactic differences to more involved issues such as the treatment of cut and making the exploitation of certain types of parallelism possible. This paper provides basic guidelines for constructing an automatic compiler of Prolog programs into AKL, which can bridge those differences. In addition to supporting Prolog, our style of translation achieves independent and-parallel execution where possible, which is relevant since this type of parallel execution preserves, through the translation, the user-perceived "complexity" of the original Prolog program

    Técnicas de transformación de programas lógicos para su optimización y paralelización automática

    Full text link
    La tesis propone transformaciones de programas lógicos que tienen por objetivo su optimización mediante la explotación del paralelismo en su ejecución. Se estudia el método consistente en aunar el análisis y la transformación de los programas, y se emplean como principio optimizador distintas nociones de independencia. La tesis comienza con el estudio, primero metodológico y luego experimental, de algoritmos de transformación previamente propuestos, para la paralelizacion a nivel de meta. El estudio identifica y propone posibles extensiones a los algoritmos, asi como otros nuevos, comparandolos mediante una serie de pruebas experimentales. A continuacion se discute la aplicabilidad del método a formas mas evolucionadas de la programación lógica, cuales son la programación lógica concurrente, con restricciones, y concurrente con restricciones. En primer lugar, se presenta un esquema de transformación de programas Prolog a programas AKL, el cual incorpora técnicas que permiten explotar el paralelismo (basado en independencia) de forma completa en el lenguaje destino. En una segunda parte de la tesis, se desarrolla una semántica formal capaz de expresar el significado operacional de prácticamente toda la familia de los lenguajes lógicos. Esta semántica permite captar el concepto de independencia a niveles de granularidad mucho mas finos que el clasico nivel de meta, lo cual da pie a identificar posibles optimizaciones aplicables a los programas lógicos, de uno y otro tipo, a niveles completamente nuevos en el computo. Para sacar partido de tales optimizaciones, se definen esquemas de transformación a un lenguaje destino "kernel" que hacen posible la explotación de las mismas

    Program development using abstract interpretation (and the ciao system preprocessor)

    Get PDF
    The technique of Abstract Interpretation has allowed the development of very sophisticated global program analyses which are at the same time provably correct and practical. We present in a tutorial fashion a novel program development framework which uses abstract interpretation as a fundamental tool. The framework uses modular, incremental abstract interpretation to obtain information about the program. This information is used to validate programs, to detect bugs with respect to partial specifications written using assertions (in the program itself and/or in system librarles), to genérate and simplify run-time tests, and to perform high-level program transformations such as múltiple abstract specialization, parallelization, and resource usage control, all in a provably correct way. In the case of validation and debugging, the assertions can refer to a variety of program points such as procedure entry, procedure exit, points within procedures, or global computations. The system can reason with much richer information than, for example, traditional types. This includes data structure shape (including pointer sharing), bounds on data structure sizes, and other operational variable instantiation properties, as well as procedure-level properties such as determinacy, termination, non-failure, and bounds on resource consumption (time or space cost). CiaoPP, the preprocessor of the Ciao multi-paradigm programming system, which implements the described functionality, will be used to illustrate the fundamental ideas

    Efficient top-down set-sharing analysis using cliques

    Get PDF
    Abstract. We study the problem of efficient, scalable set-sharing analysis of logic programs. We use the idea of representing sharing information as a pair of abstract substitutions, one of which is a worst-case sharing representation called a clique set, which was previously proposed for the case of inferring pair-sharing. We use the clique-set representation for (1) inferring actual set-sharing information, and (2) analysis within a top-down framework. In particular, we define the new abstract functions required by standard top-down analyses, both for sharing alone and also for the case of including freeness in addition to sharing. We use cliques both as an alternative representation and as widening, defining several widening operators. Our experimental evaluation supports the conclusión that, for inferring set-sharing, as it was the case for inferring pair-sharing, precisión losses are limited, while useful efficieney gains are obtained. We also derive useful conclusions regarding the interactions between thresholds, precisión, efficieney and cost of widening. At the limit, the clique-set representation allowed analyzing some programs that exceeded memory capacity using classical sharing representations

    Sharing, freeness, linearity, redundancy, widenings, and cliques

    Get PDF
    We discuss here different variants of the Sharing abstract domain, including the base domain that captures set-sharing, a variant to capture pairsharing, in which redundant sharing groups (w.r.t. the pair-sharing property) can be eliminated, and an alternative representation based on cliques. The original proposal for using cliques in the non-redundant version of the domain is reviewed, then extended to the base domain. Variants of all the domains including freeness alone, and freeness together with linearity are also studied

    Inferring determinacy and mutual exclusion in logic programs using mode and type analysis.

    Full text link
    We propose an analysis for detecting procedures and goals that are deterministic (i.e., that produce at most one solution at most once), or predicates whose clause tests are mutually exclusive (which implies that at most one of their clauses will succeed) even if they are not deterministic. The analysis takes advantage of the pruning operator in order to improve the detection of mutual exclusion and determinacy. It also supports arithmetic equations and disequations, as well as equations and disequations on terms, for which we give a complete satisfiability testing algorithm, w.r.t. available type information. We have implemented the analysis and integrated it in the CiaoPP system, which also infers automatically the mode and type information that our analysis takes as input. Experiments performed on this implementation show that the analysis is fairly accurate and efficient
    corecore